﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Mother.Master" AutoEventWireup="true"
    CodeBehind="CustomerPage.aspx.cs" Inherits="WeiboFilter.CustomerPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="Scripts/jquery-1.5.1.js" type="text/javascript"></script>
    <script src="Style/ui/jquery.ui.core.js" type="text/javascript"></script>
    <script src="Style/ui/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="Style/ui/jquery.ui.tabs.js" type="text/javascript"></script>
    <link href="Style/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <link href="Style/demos.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(document).ready(function () {
            $("#tabs").tabs();
            $("#btnAdd").click(function () {

                operate = $("#optParm").val();
                if (operate == 0) {
                    alert("请选择参数");
                    return;
                }
                w_new = $("#txtWord").val();
                if (w_new == "") {
                    alert("请填入单词");
                    return;
                }
                $("#divResult").html("<img src='Picture/Loading.gif' />");

                url = "Operate/addWords.aspx?word=" + escape(w_new) + "&op=" + escape(operate);
                $.get(url, function (data) {
                    $("#divResult").html(data);
                });
            });
            $("#txtWord").change(function () {
                $("#divResult").html("");
            });
        });

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>
        用户操作</h2>
    <div id="tabs">
        <ul>
            <li><a href="#weibo">微博用户</a></li>
            <li><a href="#changePWD">修改密码</a></li>
            <li><a href="#addWord">添加单词</a></li>
            <li><a href="#backup">备份微博</a></li>
        </ul>
        <div id="weibo">
            <asp:Button Text="获取微博信息并存入数据库" runat="server" ID="btnSinaToDB" OnClick="btnSinaToDB_Click" />
            <br />
            <asp:Label ID="lblInfo" runat="server" Text=""></asp:Label>
        </div>
        <div id="backup">
            <asp:Button ID="btnBackUp" runat="server" Text="备份你自己的微博" OnClick="btnBackUp_Click" />
        </div>
        <div id="changePWD">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="label">
                        输入老密码：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        输入新密码：
                    </td>
                    <td>
                        <asp:TextBox ID="txtNewPwd" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        再输一遍：
                    </td>
                    <td>
                        <asp:TextBox ID="txtNewPwd2" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" Text="确认" OnClick="btnSubmit_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="addWord">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        建议：单词词性为名动行
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        <input id="txtWord" type="text" name="txtWord" value="" />
                    </td>
                    <td>
                        <select id="optParm">
                            <option value="0">----</option>
                            <option value="1">正向</option>
                            <option value="-1">负向</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        <input id="btnAdd" type="button" name="btnAdd" value="加入" />
                    </td>
                    <td>
                        <div id="divResult">
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>